import yaml


def read_yaml(yaml_path):
    with open(yaml_path,mode='r',encoding='utf-8')as f:
        value = yaml.load(f,Loader=yaml.FullLoader)
        return value

# def write_yaml(yaml_path,string):
#     with open(yaml_path,mode='a+',endcoding='utf-u')as f:



if __name__ == '__main__':
    print(read_yaml('../data/accounts_data.yaml'))

#读文件，返回文件内容
def readFile(url):
    f = open(url,"r")
    s = f.read()
    f.close()
    return s
#写文件
def writeFile(url,String):
    f=open(url,"w")
    f.write(String)
    f.close()

#URL参数化 #已封装到common
def api_url(api):
    url = 'http://192.168.64.128:38000'+ api
    return url

# home： http://192.168.64.128:38000
# school：http://192.168.198.128:38000